package com.huawei;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateTest {
    public static String getTime(){
        Date date = new Date();
        System.out.println(date);

        SimpleDateFormat dataFormat = new SimpleDateFormat("yyyy年MM月dd日HH:mm:ss");
        String format = dataFormat.format(date);
        System.out.println(format);

        return format;
    }
}
